﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using PureMVC.Patterns;
using PureMVC.Interfaces;
using GameEngine.Clients.Silverlight.View;
using MySettlers.Screens;
using GameEngine.Model.Data;

namespace MySettlers.Commands
{
    public class GameEditorMenu_In_Command : SimpleCommand
    {
        override public void Execute(INotification notification)
        {
            //IGameVO<int> game = (IGameVO<int>)notification.Body;
            //if (game == null)
            //{
            //    game = new GameVO<int>(new IGameVOId(""));
            //}
            //GameEditorMediator editorMediator = new GameEditorMediator(MyFacade.EditorPageMediatorName, new GameEditorMenu(game), MyFacade.GAMEEDITORMENU_OUT_COMMAND);
            //MyFacade.Instance.RegisterMediator(editorMediator);
            //MyFacadeHelper.DesktopNavigate(editorMediator.ViewComponent);
        }
    }

    public class GameEditorMenu_Out_Command : SimpleCommand
    {
        override public void Execute(INotification notification)
        {
            switch (notification.Body as string)
            {
                case GameEditorMenu.BACKBUTTON:
                    MyFacade.Instance.SendNotification(MyFacade.PAGE_MAIN_IN_COMMAND);
                    break;
                case GameEditorMenu.NEWRESOURCEBUTTON:
                    //MyFacade.Instance.SendNotification(MyFacade.PAGE_EDITORNEWLEVEL_IN_COMMAND);
                    break;
                case GameEditorMenu.EDITRESOURCEBUTTON:
                    //MyFacade.Instance.SendNotification(MyFacade.PAGE_EDITORLOADLEVEL_IN_COMMAND);
                    break;
                case GameEditorMenu.NEWVIEWBUTTON:
                    //MyFacade.Instance.SendNotification(MyFacade.PAGE_EDITORNEWLEVEL_IN_COMMAND);
                    break;
                case GameEditorMenu.EDITVIEWBUTTON:
                    //MyFacade.Instance.SendNotification(MyFacade.PAGE_EDITORLOADLEVEL_IN_COMMAND);
                    break;
                case GameEditorMenu.NEWTHINGTYPEBUTTON:
                    //MyFacade.Instance.SendNotification(MyFacade.PAGE_EDITORNEWLEVEL_IN_COMMAND);
                    break;
                case GameEditorMenu.EDITTHINGTYPEBUTTON:
                    //MyFacade.Instance.SendNotification(MyFacade.PAGE_EDITORLOADLEVEL_IN_COMMAND);
                    break;
                case GameEditorMenu.NEWLEVELBUTTON:
                    //MyFacade.Instance.SendNotification(MyFacade.PAGE_EDITORNEWLEVEL_IN_COMMAND);
                    break;
                case GameEditorMenu.EDITLEVELBUTTON:
                    //MyFacade.Instance.SendNotification(MyFacade.PAGE_EDITORLOADLEVEL_IN_COMMAND);
                    break;
            }
        }
    }
}
